﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using web.Models;

namespace web.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";

            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your app description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
        public ActionResult home()
        {
            //fashionEntities3 db = new fashionEntities3();
            //string chuoi = "";
            //var product = (from p in db.Products orderby p.Id descending select p).Take(12).ToList();
            //for (int i = 0; i < product.Count; i++)
            //{
            //    chuoi += "<div class=list-product>";
            //    chuoi += "<div class=list-product-box>";
            //    chuoi += " <div class=list-product-box-item>";
            //    chuoi += "<img src=\"" + product[i].Image + "\"/>";
            //    chuoi += "<br/>" + product[i].Name + "<br/>";
            //    chuoi += "<p>gia ban: " + product[i].Price + "</p>";

            //    chuoi += "</div>";
            //    chuoi += "</div>";

            //    chuoi += "</div>";
            //}
            //ViewBag.View = chuoi;
            //  ViewBag.raw = chuoi;
            return View();

        }

        }

    }
